package com.deer.wms.ASN.manage.model.qc;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;

/**
 * @author guo
 */
@Getter
@Setter
@NoArgsConstructor
@Table(name = "qc_record")
public class QcRecord {
    /**
     * 主键
     */
    @Id
    @Column(name = "qc_record_id")
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer qcRecordId;

    /**
     * 质检单号
     */
//    @Column(name = "qc_record_code")
    private String qcRecordCode;

    /**
     * 质检详情单号(可为空)
     */
    @Column(name = "qc_detail_no")
    private String qcDetailNo;

    /**
     * 质检单号(可为空)
     */
    private String qcBillNo;

    /**
     * 物料编码
     */
    @Column(name = "item_code")
    private String itemCode;

    /**
     * 物料名称
     */
    @Column(name = "item_name")
    private String itemName;

    /**
     * 单位ID
     */
    @Column(name = "pack_detail_id")
    private Integer packDetailId;

    /**
     * 单位描述
     */
    @Column(name = "pack_describe")
    private String packDescribe;

    /**
     * 应检数量 (计划数量)
     */
    @Column(name = "qc_quantity")
    private Double qcQuantity;

    /**
     * 已检数量
     */
    @Column(name = "check_quantity")
    private Double checkQuantity;

    /**
     * 实检数量
     */
    @Column(name = "real_quantity")
    private Double realQuantity;

    /**
     * 合格数量
     */
    @Column(name = "qualified_quantity")
    private Double qualifiedQuantity;

    /**
     * 不合格数量
     */
    @Column(name = "fied_quantity")
    private Double fiedQuantity;

    /**
     * 让步数量
     */
    @Column(name = "concession_quantity")
    private Double concessionQuantity;

    /**
     * 检验时间
     */
    @Column(name = "qc_time")
    private String qcTime;

    /**
     * 检验人ID
     */
    @Column(name = "qc_user_id")
    private Integer qcUserId;

    /**
     * 检验人
     */
    @Column(name = "qc_user_name")
    private String qcUserName;

    /**
     * 检验结果(0-不合格 1-合格 2-让步)
     */
    @Column(name = "qc_result")
    private Integer qcResult;

    private Integer billType;

    /**
     * 仓库id
     */
    private Integer wareId;

    /**
     * 仓库名称
     */
    private String wareName;

    /**
     * 最低通过率
     */
    private Double minPassRate;

    /**
     * 库存id(???待删除)
     */
    private Integer inventoryId;

    /**
     * 收货单id
     */
    private Integer acceptRecordId;

    /**
     * 收货单号
     */
    @Column(name = "accept_record_code")
    private String acceptRecordCode;

    /**
     * 批次id
     */
    private Integer batchId;

    /**
     * 批次号
     */
//    @Column(name = "batch_name")
    private String batchName;

    @TableField(exist = false)
    private Double achieveQuantity;
    @TableField(exist = false)
    private String remake;


    /**
     * 异常单号
     */
    @TableField(exist = false)
    private String abnormalBillNo;

    /**
     * 特采单号
     */
    @TableField(exist = false)
    private String especiallyBillNo;



    @TableField(exist = false)
    private Integer concessionAcceptId; //特采单ID
    @TableField(exist = false)
    private Integer qualityAbnormalId; //异常单ID


    @TableField(exist = false)
    private String asnBillNo; //入库单号记录库存事务
    private String auditId; //审核id
    private Integer auditState; //审核状态
}
